import request from '@/utils/request'

// 查询营地周边景点列表
export function listSpots(query) {
  return request({
    url: '/camp/spots/list',
    method: 'get',
    params: query
  })
}

// 查询营地周边景点详细
export function getSpots(scenicId) {
  return request({
    url: '/camp/spots/' + scenicId,
    method: 'get'
  })
}

// 新增营地周边景点
export function addSpots(data) {
  return request({
    url: '/camp/spots',
    method: 'post',
    data: data
  })
}

// 修改营地周边景点
export function updateSpots(data) {
  return request({
    url: '/camp/spots',
    method: 'put',
    data: data
  })
}

// 删除营地周边景点
export function delSpots(scenicId) {
  return request({
    url: '/camp/spots/' + scenicId,
    method: 'delete'
  })
}
